Content processing for personal over-the-top network video recorder

ABSTRACT

Live streaming video content is processed and stored for real-time delivery of the content, future VoD viewing of the content, and time-shifted viewing of the content, by manipulating a common manifest or playlist. Previously stored content may be reordered and/or recombined in order to provide a personalized content viewing experience.

BACKGROUND

This invention relates in general to over-the-top (OTT) media delivery.

One known technique for OTT media delivery employs segmentation of mediaobjects and the use of playlists or “manifests” by clients (or theirproxies) to retrieve the segments in an ordered manner for local clientplayback of the media object. Among other benefits, segment-baseddelivery can more easily be provided by general-purpose and widelyimplemented network protocols such as HTTP, avoiding various costs andcomplexities that accompany more specialized media delivery protocols.

SUMMARY

Disclosed is a technique for one-time processing of live streamingcontent for use with real-time delivery, time-shifted delivery, andfuture video on demand (VoD) delivery. The technique may be referred togenerally as a “network personal video recorder” or “npvr”. Inparticular, the disclosed technique employs a client-side proxy thatmakes heavy use of manifests to provide the various delivery functionsto a client device. Certain commonalities among different delivery modesare taken advantage of in the use of the manifests, so that manifestmanipulation functions can be leveraged across different uses inoperation.

In particular, a method is disclosed for server-side processing ofcontent to support network personal video recorder functions. The methodincludes continually performing steps of (i) acquiring real-timestreaming source content containing a program, (ii) transcoding theacquired source content into distinct encodings to create respectivecontent streams, and (iii) segmenting the content streams into segmentsand uploading the segments to one or more content delivery networks(CDNs) for retrieval and use in rendering the program at a media player.Here “program” refers to a section of a live streaming content. It mayor may not correspond to a “program” in the usual sense, e.g., atelevision show, etc. Program boundaries can be detected by variousmeans, including in-band SCTE-35 cue tones, out-of-band signals, etc.

The method further includes generating manifests for the program andcontinually updating the manifests and uploading the updated manifeststo the CDNs as the segments are uploaded to the CDNs. The manifestsinclude a master manifest and set of network-personal-video-recorder(npvr) manifests for respective ones of the encodings, where the mastermanifest includes references to the set of npvr manifests to enableselection from among the encodings in rendering the program at the mediaplayer, and the npvr manifests are progressively growingnon-sliding-window manifests updated as new segments are uploaded.

Upon detecting a program boundary of the program in the source content,a current set of npvr manifests are completed in current directories ofthe CDNs. Then new directories are created in the CDNs and a new set ofnpvr manifests are started in the new directories. Subsequent segmentsand npvr manifest updates are uploaded to the new directories.

Also disclosed is a client-side method for rendering content that isavailable in one or more distinct encodings each including a respectiveset of sequential segments. The method includes proxying a manifestrequest from a media player to a content server, selecting a preferredencoding for requested content to be delivered, determining a set ofnpvr manifests required to satisfy the content request and obtaining aselected one or more of the set of npvr manifests associated with theselected encoding, the npvr manifests specifying locations of segmentsof the respective encodings. A variant manifest is also created from theselected npvr manifest and provided to the media player for use inobtaining the segments of the respective encoding for playback of thecontent. Different types of variant manifest may be employed to supportdifferent functionality, including a sliding-window type of variantmanifest (i.e., generated from an npvr manifest) for live streaming ortime-shifted playback. A non-sliding-window type of variant manifest(i.e., a modified version of the npvr manifest) can be used to supportdelivery of prerecorded media, e.g., video on demand.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing and other objects, features and advantages will beapparent from the following description of particular embodiments of theinvention, as illustrated in the accompanying drawings in which likereference characters refer to the same parts throughout the differentviews.

FIG. 1 is a block diagram of a system which is capable of conductingend-to-end content delivery procedures, in accordance with variousembodiments;

FIG. 2 is a block diagram of a system which is capable of conductingend-to-end content delivery procedures, in accordance with variousembodiments;

FIG. 3 is a flow chart showing a method for performing mediapreparation, in accordance with various embodiments;

FIG. 4 is a flow chart showing a method for performing real-time contentrendering, in accordance with various embodiments;

FIGS. 5A and 5B are flow charts showing methods for performingtime-shifted content rendering, in accordance with various embodiments;and

FIG. 6 is a flow chart showing a method for performing VoD contentrendering, in accordance with various embodiments.

DETAILED DESCRIPTION

In the description herein for embodiments, numerous specific details areprovided, such as examples of components and/or methods, to provide athorough understanding. One skilled in the relevant art will recognize,however, that an embodiment can be practiced without one or more of thespecific details, or with other apparatus, systems, assemblies, methods,components, materials, parts, and/or the like. In other instances,well-known structures, materials, or operations are not specificallyshown or described in detail to avoid obscuring aspects of embodiments.

In FIG. 1 is a block diagram for one embodiment of a system 100. Thesystem has a plurality of network-connected components including aworkflow manager (WFM) 102, media processing server or “packager” 104,streaming proxy 106, content delivery network(s) (CDNs) 108, clientmedia player or “client” 110, and content management system (CMS) 112.It also includes an advertisement decision manager (ADM) 114 having aconnection to the proxy 106. In the illustrated embodiment, the proxy106 is separate from the client 110—it may be located in a server-typeof computer distinct from the client-type of computer (personalcomputer, etc.) in which the client 110 is located. In an alternativeembodiment described below, the proxy 106 may be included as part of theclient 110.

In general, the system operates to deliver content from the CDNs 108 tothe client 110 using a segment-based content delivery mechanism, such asHTTP Live Streaming (HLS), Dynamic Adaptive Streaming over HTTP (DASH),SmoothStreaming, or any other HTTP Adaptive Streaming (HAS) protocol, asshould be known by those skilled in the art. The term “segment-based”should be understood to mean a unit of video data smaller than the fullduration or length of the video. While the semantic distinction between“segment” files and “fragments” within a file should be known to thoseskilled in the art, the term “segment” used here should be understood toapply equally to segment, fragment, chunk, etc. (as described by a givenprotocol)—partial video data units derived from a longer piece ofcontent. The client 110 requests segments as described by a playlist or“manifest” as generally known in the art. As described in detail below,the proxy 106 is heavily involved in the creation and use of manifeststo provide certain playback functions to the client 110.

The workflow manager (WFM) 102 receives a real-time streaming contentingestion request from the content management system (CMS) 112. The WFM102 instructs the packager 104 to begin processing the real-timestreaming content, transcoding the content into a plurality of distinctencodings (e.g., audio or video at different bitrates/framerates/resolutions, audio in different languages or subtitles, ordifferent encryption algorithms and keys) as defined by the CMS 112 andconfigured through the WFM 102, segmenting the individual bitratestreams, encrypting the segments, and uploading the segments to aplurality of content delivery networks (CDNs) 108.

The media processing server 104 (referred to herein as packager 104)generates a master manifest from the encoding configuration receivedfrom the WFM 102. The packager 104 generates variant manifests for eachencoding (referred to herein as npvr manifests). The npvr manifest for agiven encoding is a non-sliding-window manifest that is updated as eachsegment for the encoding is generated. The segment is uploaded and thenthe npvr manifest is also uploaded. The npvr manifest grows in sizeuntil the program is complete. When the program completes, the manifestis finalized and a new program directory and new npvr manifest arecreated for the next program. Each new manifest contains a pointer tothe previous sequential npvr manifest. When a manifest is finalized itis updated with a pointer to the next sequential npvr manifest.

The term “program” is used herein primarily to describe a section of alive streaming content corresponding to an npvr manifest. It may or maynot correspond to a “program” in the usual sense, e.g., a televisionshow, etc. In one embodiment program boundaries are detected via in-bandSCTE-35 cue tones. In another embodiment, program boundaries aredetected based on out-of-band SCTE-118 or proprietary electronic programguide (EPG) protocol data. In another embodiment, program boundaries aregenerated periodically using a fixed program duration (e.g., every 30minutes). In another embodiment, programs may be defined by a user byproviding a fixed time range (e.g., specifying the start and end timefor a recording or the start time and a duration for the recording).There are multiple ways to define program boundaries as should be knownto those skilled in the art. It should be understood that any method ofprogram boundary detection may be applied to the current invention.

In one embodiment, the initial npvr manifest for a new program havingonly one segment may look as follows, using an M3U8 format:

  #EXTM3U   #EXT-X-TARGETDURATION:10   #EXT-X-VERSION:4  #EXT-X-MEDIA-SEQUENCE:1000  #EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-100  #EXT-X-DISCONTINUITY:TYPE=“PGM”,PID=“Y”  ##EXT-AZK-CHAIN:PREV=“http://cdn1.example.com/1/2013/02/01/001-X/index.m3u8”  ##EXT-AZK-SEG:TIME=“2013-02-01T19:00:00”,KEY=“key-   100”,RATING=“PG”  #EXTINF:10.0,  http://cdn1.example.com/1/2013/02/01/002-Y/seg-01000.ts

The npvr manifest is initialized with program information and a pointerto the previous npvr manifest.

In one embodiment, wall-clock timestamp information is included as acomment for each segment. In one embodiment, encryption key IDinformation is included as a comment for each segment. In oneembodiment, rating information is included as a comment for eachsegment. There are many ways to represent wall-clock time, keyinformation, and rating information, as should be known to those skilledin the art. Any valid representation for wall-clock time, keyinformation, and rating information should be considered valid for usewith the current invention.

Continuing the example for the above described embodiment, after tenseconds (one segment duration), the npvr manifest would be updated witha second segment and look as follows:

  #EXTM3U   #EXT-X-TARGETDURATION:10   #EXT-X-VERSION:4  #EXT-X-MEDIA-SEQUENCE:1000  #EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-100  #EXT-X-DISCONTINUITY:TYPE=“PGM”,PID=“Y”  ##EXT-AZK-CHAIN:PREV=“http://cdn1.example.com/1/2013/02/01/001-X/index.m3u8”  ##EXT-AZK-SEG:TIME=“2013-02-01T19:00:00”,KEY=“key-   100”,RATING=“PG”  #EXTINF:10.0,  http://cdn1.example.com/1/2013/02/01/002-Y/seg-01000.ts  ##EXT-AZK-SEG:TIME=“2013-02-01T19:00:10”,KEY=“key-   100”,RATING=“PG”  #EXTINF:10.0,  http://cdn1.example.com/1/2013/02/01/002-Y/seg-01001.ts

Continuing the example for the above described embodiment, once theprogram completes 599 segments later, the completed manifest would lookas follows:

  #EXTM3U   #EXT-X-TARGETDURATION:10   #EXT-X-VERSION:4  #EXT-X-MEDIA-SEQUENCE:1000  #EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-100  #EXT-X-DISCONTINUITY:TYPE=“PGM”,PID=“Y”  ##EXT-AZK-CHAIN:PREV=“http://cdn1.example.com/1/2013/02/01/001-X/index.m3u8”  ##EXT-AZK-SEG:TIME=“2013-02-01T19:00:00”,KEY=“key-   100”,RATING=“PG”  #EXTINF:10.0,  http://cdn1.example.com/1/2013/02/01/002-Y/seg-01000.ts  ##EXT-AZK-SEG:TIME=“2013-02-01T19:00:10”,KEY=“key-   100”,RATING=“PG”  #EXTINF:10.0,  http://cdn1.example.com/1/2013/02/01/002-Y/seg-01001.ts   . . .  ##EXT-AZK-SEG:TIME=“2013-02-01T19:10:00”,KEY=“key-   102”,RATING=“PG”  #EXTINF:10.0,  http://cdn1.example.com/1/2013/02/01/002-Y/seg-01600.ts  ##EXT-AZK-CHAIN:NEXT=“http://cdn1.example.com/1/2013/02/01/003-Z/index.m3u8”   #EXT-X-ENDLIST

The npvr manifest is updated with a pointer to the next sequential npvrmanifest and an ENDLIST tag. In the example above, key rotation occurredat some point, thus the encryption key ID for the final segment differsfrom the encryption key ID of the first segment.

In one embodiment, the directory structure program is hierarchical basedon the program boundaries and the date and time the program wasprocessed, as well as the source stream ID and transcoded bitrate, e.g.:

<media_id>/<year>/<month>/<day>/<zp_seq>-<pid>/<bitrate>/<limit>,

where <media_id> identifies the source stream, <year>, <month>, and<day> represent the date the initial program segment was processed,<zp_seq>-<pid> represents the program identifier with a zero paddedsequence number for lexicographical sorting, <bitrate> represents thetranscoded bitrate (though more generically describes the encoding,e.g., different bitrate/resolution audio/video, different language audioand subtitles, and/or different encryption algorithms), and <limit>represents an additional level by which directory size limits may bemoderated for long running programs. In one embodiment, the <pid>corresponds to a unique identifier used to correlate program metadata.In one embodiment, the program identifier may contain additionalrelational metadata associating the program to one or more of: aparticular content provider, a specific program series, an individualprogram episode, a unique instance of a program airing at a given time,etc. It should be understood that the program identifier in this contextis a generic identifier for the npvr-program being processed and doesnot necessarily correlate to a given semantic meaning for the genericterm program or the term program used within the context of a givenmetadata definition as should be known to those skilled in the art. Inone embodiment, when program boundaries are determined based on fixedprogram durations, the <pid> may denote the wall clock time when theprogram started.

In one embodiment, the npvr manifest is an HTTP Live Streaming variantmanifest. Completion of the manifest involves adding an ENDLIST tag tothe end of the npvr manifest and adding a comment to point to the nextsequential npvr manifest in the new program directory. The new npvrmanifest should be initialized with a comment pointing to the previoussequential npvr manifest that was just completed. In one embodiment, anew encryption key is generated on program boundaries and a reference tothe new key is included in the new npvr manifest. In another embodiment,the last encryption key is carried over from the previous npvr manifestand the initialization vector (IV) information is correspondinglygenerated. In one embodiment, the IV information is set in theMEDIA-SEQUENCE tag. In another embodiment, the IV information isexplicitly set with the KEY tag. In one embodiment, the packager 104inserts wall-clock timestamp, encryption key, and rating information incomments associated with each segment in the npvr manifest. In yetanother embodiment, there may be a key change in the middle of a programand the new key carried over to the next program.

In one embodiment, the packager 104 detects advertisements in the livecontent stream. In one embodiment, the packager 104 detectsadvertisements based on in-band messages (e.g., SCTE-35 cue tones). Inanother embodiment, the packager 104 is notified a priori out-of-band ofthe advertisement air time using a wall-clock start time and duration orend time for the advertisement. There are multiple ways to defineadvertisement boundaries as should be known to those skilled in the art.It should be understood that any method of advertisement boundarydetection may be applied to the current invention. In one embodiment,the advertisement start and stop are included as comments and/ordiscontinuity indicators in the npvr manifest. In one embodiment,upcoming advertisement start and stop indicators are included ascomments in the npvr manifest. Extending the M3U8 example above, thefollowing manifest shows an example where program outpoint (POP)discontinuity (advertisement start) and program inpoint (PIP)discontinuity (advertisement end) notifications are inserted into thenpvr manifest before segment 1006 (the first segment of theadvertisement) and after segment 1008 (the last segment of theadvertisement) noting the possible discontinuity in the stream due toadvertisement insertion. The EXT-AZK-SEG comments for segments 1005 and1008 also note the upcoming PIP and POP, respectively:

  #EXTM3U   #EXT-X-TARGETDURATION:10   #EXT-X-VERSION:4  #EXT-X-MEDIA-SEQUENCE:1000  #EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-100  #EXT-X-DISCONTINUITY:TYPE=“PGM”,PID=“Y”  ##EXT-AZK-CHAIN:PREV=“http://cdn1.example.com/1/2013/02/01/001-X/index.m3u8”  ##EXT-AZK-SEG:TIME=“2013-02-01T19:00:00”,KEY=“key-   100”,RATING=“PG”  #EXTINF:10.0,  http://cdn1.example.com/1/2013/02/01/002-Y/seg-01000.ts  ##EXT-AZK-SEG:TIME=“2013-02-01T19:00:10”,KEY=“key-   100”,RATING=“PG”  #EXTINF:10.0,  http://cdn1.example.com/1/2013/02/01/002-Y/seg-01001.ts    . . .  ##EXT-AZK-SEG:TIME=“2013-02-01T19:00:50”,KEY=“key-101”,RATING=“PG”,POP   #EXTINF:10.0,  http://cdn1.example.com/1/2013/02/01/002-Y/seg-01005.ts  #EXT-X-DISCONTINUITY:TYPE=“POP”  ##EXT-AZK-SEG:TIME=“2013-02-01T19:01:00”,KEY=“key-   101”,RATING=“PG”  #EXTINF:10.0,  http://cdn1.example.com/1/2013/02/01/002-Y/seg-01006.ts  ##EXT-AZK-SEG:TIME=“2013-02-01T19:01:10”,KEY=“key-   101”,RATING=“PG”  #EXTINF:10.0,  http://cdn1.example.com/1/2013/02/01/002-Y/seg-01007.ts  ##EXT-AZK-SEG:TIME=“2013-02-01T19:01:20”,KEY=“key-  101”,RATING=“PG”,PIP   #EXTINF:10.0,  http://cdn1.example.com/1/2013/02/01/002-Y/seg-01008.ts  #EXT-X-DISCONTINUITY:TYPE=“PIP”    . . .  ##EXT-AZK-SEG:TIME=“2013-02-01T19:10:00”,KEY=“key-   102”,RATING=“PG”  #EXTINF:10.0,  http://cdn1.example.com/1/2013/02/01/002-Y/seg-01600.ts  ##EXT-AZK-CHAIN:NEXT=“http://cdn1.example.com/1/2013/02/01/003-Z/index.m3u8”   #EXT-X-ENDLIST

When the client 110 wishes to playback the real-time streaming content,it issues a request for the master manifest to the proxy 106. The proxy106, using information gathered from the WFM 102, generates a mastermanifest for the client 110. In one embodiment, the proxy 106 accessesthe master manifest generated by the packager 104, which is placed bythe packager 104 in the CDNs 108. The master manifest contains a list ofURLs pointing to the different npvr manifests associated with theavailable variant stream encodings (e.g., different bitrate/resolutionaudio/video and/or different language audio and subtitles). In oneembodiment, the information gathered from the WFM 102 includesentitlement information which limits the encodings included in themaster manifest (e.g., limiting bitrate/resolution based on a maximumallowable bitrate/resolution for the content, or for the particularclient 110, such as described in International Patent ApplicationPublication WO 2011/139305). The master manifest is returned to theclient 110 which then picks an encoding for playback and issues arequest to the proxy 106 for the variant stream manifest. The proxy 106retrieves the current npvr manifest from one of the CDNs 108, using forexample techniques shown in US Patent Application Publication US2012/0240176. The proxy 106 then generates a variant manifest based onthe information in the retrieved npvr manifest.

Depending on the current mode of playback, parsing of the npvr manifestand generation of the variant manifest differs as described below. Thevariant manifest is then returned to the client 110.

1. Live Playback

If more than the necessary number of N segments (e.g., 3) are availablein the most recent npvr manifest, the proxy 106 will trim the beginningsegments leaving only N segments (adjusting the encryption keyinformation accordingly, e.g., by selecting the last key specifiedbefore the current segment and applying the proper IV as required, asshould be familiar to those skilled in the art) and return a slidingwindow manifest to the client 110. Using the M3U8 manifest from theprevious example, assuming only the first 300 segments of program Y havebeen processed by the packager 104, the proxy 106 would generate thefollowing manifest using the last three segments:

#EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:4#EXT-X-MEDIA-SEQUENCE:1297#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-100##EXT-AZK-SEG:TIME=“2013-02-01T19:04:30”,KEY=“key- 100”,RATING=“PG”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/002-Y/seg-01297.ts##EXT-AZK-SEG:TIME=“2013-02-01T19:04:40”,KEY=“key- 100”,RATING=“PG”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/002-Y/seg-01298.ts##EXT-AZK-SEG:TIME=“2013-02-01T19:04:50”,KEY=“key- 100”,RATING=“PG”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/002-Y/seg-01299.ts

If the most recent npvr manifest contains fewer than N segments, theproxy 106 will use the previous npvr manifest pointer to retrieveprevious npvr manifest(s) and draw additional segments from previousnpvr manifest(s) as necessary to generate the sliding window manifest(adjusting the encryption key information accordingly, e.g., byselecting the last key specified before the current segment and applyingthe proper IV as required, as should be familiar to those skilled in theart) and return a sliding window manifest to the client 110. Using theM3U8 manifest from the previous example, assuming only the first segmentof program Y have been processed by the packager 104, the proxy 106would generate the following manifest using the first segment fromprogram Y and two segments from the previous program X:

#EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:4#EXT-X-MEDIA-SEQUENCE:998#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-99#EXT-X-DISCONTINUITY:TYPE=“PGM”,PID=“X”##EXT-AZK-SEG:TIME=“2013-02-01T18:59:40”,KEY=“key- 99”,RATING=“PG-13”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/001-X/seg-00998.ts##EXT-AZK-SEG:TIME=“2013-02-01T18:59:50”,KEY=“key- 99”,RATING=“PG-13”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/001-X/seg-00999.ts#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-100#EXT-X-DISCONTINUITY:TYPE=“PGM”,PID=“Y”##EXT-AZK-SEG:TIME=“2013-02-01T19:00:00”,KEY=“key- 100”,RATING=“PG”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/002-Y/seg-01000.ts

2. Time-Shifted Playback (Pause, Rewind, Fast Forward)

When the client 110 wishes to pause or rewind while viewing real-timestreaming content, or subsequently fast forward after having paused orrewound while viewing real-time streaming content, it issues acorresponding request to the proxy 106. In one embodiment, the client110 will restart the media player. When the media player restarts itwill issue new requests for a master manifest and variant manifest. Whenthe proxy 106 receives the new manifest requests after restart, it willgenerate new manifests based on the pause/rewind/fast forward request.In another embodiment, the client 110 will allow the media player tocontinue without restarting. In this case, the media player willnaturally request a new variant manifest after the segment duration haselapsed, as should be known to those skilled in the art.

In one embodiment, upon receiving a pause request, the proxy 106 storesthe current npvr manifest location, current segment number andcorresponding wall-clock timestamp for the current segment. On the nextmanifest request, the proxy 106 uses the stored segment number togenerate a sliding window manifest for the client 110. In anotherembodiment, the client 110 sends the wall-clock timestamp correspondingto the pause request in the next manifest request. In one embodiment,the wall-clock timestamp is calculated as the wall-clock timecorresponding to the video position of the last playback action (i.e.,start, pause, rewind, fast forward), plus the duration of playback sincethe last playback action (e.g., based off of a free running timer orusing presentation timestamp differentials from the media player). Thereare many methods of tracking playback position and progress as should beknown to those skilled in the art, it should be understood that anymethod for determining playback position (i.e., the wall-clock timecorresponding to the last playback action) should be suitable for thecurrent invention.

In one embodiment, the proxy 106 will find the next segment that followsthe stored segment number (taking into account program boundaries andusing the next npvr manifest pointer to resolve boundary crossings andadjusting encryption key information as necessary, e.g., by selectingthe last key specified before the current segment and applying theproper IV as required, as should be familiar to those skilled in theart) and generate the sliding window manifest. In another embodiment,the proxy 106 will find the segment which has the most recent associatedwall-clock timestamp which is beyond the saved wall-clock timestamp, orthe wall-clock timestamp included in the manifest request. Using theM3U8 manifest from the previous examples, assuming the client 110 wasviewing the stream in real-time and had last been presented with asliding window manifest that ended in segment seg-01100 when itrequested a pause, and did not resume playback for 2 minutes: the mostcurrent real-time segment (assuming no short segments were generated,e.g., due to advertisement boundary chopping) would be seg-01220, andstarting a new player would generate a sliding window manifestcontaining segments seg-01220, seg-01219, and seg-01218, however, thepost-pause manifest generated by the proxy 106 would contain segmentsseg-01099, seg-01100, and seg-01101, allowing the client 110 to continuewhere it left off. If the client 110 was not viewing the stream inreal-time, but had previously paused/rewound/fast forwarded, the sameprincipal would apply using the most recent segment that had beenpresented to the client 110 media player.

In one embodiment, upon receiving a rewind request, the proxy 106 usesthe current segment number and corresponding wall-clock timestamp forthe current segment to calculate a target wall-clock time based on thenumber of seconds the user wishes to rewind. In another embodiment, theclient 110 sends the wall-clock timestamp corresponding to the targetwall-clock time of the rewind operation in the next manifest request. Inone embodiment, the target wall-clock timestamp is calculated as thewall-clock time corresponding to the video position of the last playbackaction (i.e., start, pause, rewind, fast forward), plus the duration ofplayback since the last playback action (e.g., based off of a freerunning timer or using presentation timestamp differentials from themedia player) minus the number of seconds the user wishes to rewind.There are many methods of tracking playback position and progress asshould be known to those skilled in the art, it should be understoodthat any method for determining the target wall-clock time should besuitable for the current invention.

Using the target wall-clock time, the proxy determines the segmentnumber corresponding to that wall-clock time by searching the npvrmanifest. In one embodiment, if the target wall-clock time does notreside in the current npvr manifest, the proxy 106 uses the previousnpvr manifest pointers to find the npvr manifest which contains thetarget segment corresponding to the target wall-clock time by walkingthe npvr manifest chain pointers until an npvr manifest is found whichcontains the target wall-clock time. The proxy 106 then stores thetarget-npvr manifest location along with the target segment number andcorresponding target wall-clock time. In another embodiment, the proxy106 uses information provided by the WFM 102 to determine the npvrmanifest associated with the saved wall-clock timestamp, or thewall-clock timestamp included in the manifest request. In oneembodiment, the proxy 106 periodically syncs npvr manifest informationfrom the WFM 102 (e.g., using streaming database replication). Inanother embodiment, the proxy 106 retrieves npvr manifest informationfrom a shared distributed database managed and updated by the WFM 102.

In one embodiment, the proxy 106 uses the stored target segment numberto generate a sliding window manifest for the client 110 (taking intoaccount program boundaries and using the next npvr manifest pointer toresolve boundary crossings and adjusting encryption key information asnecessary, e.g., by selecting the last key specified before the currentsegment and applying the proper IV as required, as should be familiar tothose skilled in the art). In another embodiment, the proxy 106 willfind the segment which has the most recent associated wall-clocktimestamp which is beyond the saved target wall-clock timestamp, or thetarget wall-clock timestamp included in the manifest request. Using theM3U8 manifest from the previous examples, assuming the client 110 wasviewing the stream in real-time and had last been presented with asliding window manifest that ended in segment seg-01100 when itrequested a rewind of 30 seconds. Normally (assuming no short segmentswere generated, e.g., due to advertisement boundary chopping), asubsequent manifest request would generate a sliding window manifestcontaining segments seg-01101, seg-01100, and seg-01099, however, thepost-rewind manifest generated by the proxy 106 would contain segmentsseg-01097, seg-01096, and seg-01095, allowing the client 110 to (re)viewthe previously rendered content. If the client 110 was not viewing thestream in real-time, but had previously paused/rewound/fast forwarded,the same principal would apply using the most recent segment that hadbeen presented to the client 110 media player.

The fast forward operation is similar to rewind. In one embodiment, uponreceiving a fast forward request, the proxy 106 uses the current segmentnumber and corresponding wall-clock timestamp for the current segment tocalculate a target wall-clock based on the number of seconds the userwishes to fast forward. In another embodiment, the client 110 sends thewall-clock timestamp corresponding to the target wall-clock time of thefast forward operation in the next manifest request. In one embodiment,the target wall-clock timestamp is calculated as the wall-clock timecorresponding to the video position of the last playback action (i.e.,start, pause, rewind, fast forward), plus the duration of playback sincethe last playback action (e.g., based off of a free running timer orusing presentation timestamp differentials from the media player) plusthe number of seconds the user wishes to fast forward. There are manymethods of tracking playback position and progress as should be known tothose skilled in the art, it should be understood that any method fordetermining the target wall-clock time should be suitable for thecurrent invention.

Using the target wall-clock time, the proxy determines the segmentnumber corresponding to that wall-clock time by searching the npvrmanifest. In one embodiment, if the target wall-clock time does notreside in the current npvr manifest, the proxy 106 uses the next npvrmanifest pointers to find the npvr manifest which contains the targetsegment corresponding to the target wall-clock time by walking the npvrmanifest chain pointers until an npvr manifest is found which containsthe target wall-clock time. The proxy 106 then stores the target-npvrmanifest location along with the target segment number and correspondingtarget wall-clock time. In another embodiment, the proxy 106 usesinformation provided by the WFM 102 to determine the npvr manifestassociated with the saved wall-clock timestamp, or the wall-clocktimestamp included in the manifest request. In one embodiment, the proxy106 periodically syncs npvr manifest information from the WFM 102 (e.g.,using streaming database replication). In another embodiment, the proxy106 retrieves npvr manifest information from a shared distributeddatabase managed and updated by the WFM 102.

In one embodiment, the proxy 106 uses the stored target segment numberto generate a sliding window manifest for the client 110 (taking intoaccount program boundaries and using the next npvr manifest pointer toresolve boundary crossings and adjusting encryption key information asnecessary, e.g., by selecting the last key specified before the currentsegment and applying the proper IV as required, as should be familiar tothose skilled in the art). In another embodiment, the proxy 106 willfind the segment which has the most recent associated wall-clocktimestamp which is before the saved target wall-clock timestamp, or thetarget wall-clock timestamp included in the manifest request. If thetarget wall-clock time represents a wall-clock time in the future whichis beyond the wall-clock timestamp of the most recent segment generatedby the packager 104, the proxy 106 switches back to real-time viewingand generates a sliding window manifest using the most recent N segments(taking into account program boundaries and using the next npvr manifestpointer to resolve boundary crossings and adjusting encryption keyinformation as necessary, e.g., by selecting the last key specifiedbefore the current segment and applying the proper IV as required, asshould be familiar to those skilled in the art). Using the M3U8 manifestfrom the previous examples, assuming the client 110 was viewing thestream after already having paused or rewound, where the last slidingwindow manifest presented to the client 110 media player ended insegment seg-01100, and the most recent segment generated by the packager104 is seg-01200, when the client 110 requested a fast forward of 30seconds. Without the fast forward, a subsequent time-shifted manifestrequest would generate a sliding window manifest containing segmentsseg-01101, seg-01100, and seg-01099, however, the post-fast forwardmanifest generated by the proxy 106 (assuming no short segments weregenerated, e.g., due to advertisement boundary chopping) would containsegments seg-01104, seg-01103, and seg-01102, allowing the client 110 toskip ahead. In the case of fast forward, the client 110 must not beviewing the stream in real-time, as fast forwarding in real-time has noeffect.

3. Playback of Recorded Content (VOD)

In this section, the term “program” refers to both the content for agiven npvr manifest as well as a unit of playback requested by a client,which may be different. It will be clear from context which meaning isintended.

When the client 110 wishes to playback a previously recorded programwhich was recorded from a real-time content stream, it issues a requestfor the master and variant manifests to the proxy 106. In processing thevariant manifest request, if the completed npvr manifest generated bythe packager 104 contains all the segments and key information requiredfor playback of the requested program, and only the segments and keyinformation for the requested program, the proxy transparently returnsthe npvr manifest from the CDN 108 to the client 110.

If a single completed npvr manifest generated by the packager 104contains more than the necessary number of segments, the proxy 106 trimssegments from the beginning and end of the npvr manifest (adjusting theencryption key information accordingly, e.g., by selecting the last keyspecified before a given segment and applying the proper IV as required,as should be familiar to those skilled in the art) to create a manifestcorresponding to the desired program and return it to client 110. Usingthe M3U8 manifest from the previous examples, we can trim two minutesfrom the beginning and end of program Y to generate the followingmanifest:

#EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:4#EXT-X-MEDIA-SEQUENCE:1120#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-100#EXT-X-DISCONTINUITY:TYPE=“PGM”,PID=“Y”##EXT-AZK-SEG:TIME=“2013-02-01T19:02:00”,KEY=“key- 100”,RATING=“PG”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/002-Y/seg-01120.ts .. . ##EXT-AZK-SEG:TIME=“2013-02-01T19:08:00”,KEY=“key- 102”,RATING=“PG”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/002-Y/seg-01480.ts#EXT-X-ENDLIST

If the program spans multiple npvr manifest files, the proxy 106 usesthe next and/or previous npvr manifest pointers to locate the necessarynpvr manifest files, then concatenates the segment information and trimsoff any excess segments from the beginning and end (adjusting theencryption key information accordingly, e.g., by selecting the last keyspecified before a given segment and applying the proper IV as required,as should be familiar to those skilled in the art) to generate amanifest for the desired program to return to the client 110. In oneembodiment, the program boundaries are defined by wall-clock timestamps.In one embodiment, the start segment is determined to be the segmentwhich contains the starting wall-clock timestamp, while the end segmentis determined to be the segment which contains the ending wall-clocktimestamp. Using the M3U8 manifest from the previous examples, we candraw an addition two minutes from both the previous program X and thenext program Z to generate the following manifest which spans three npvrmanifests (i.e., http:// . . . /001-X, http:// . . . /002-Y, and http://. . . /003-Z):

#EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:4#EXT-X-MEDIA-SEQUENCE:880#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-99#EXT-X-DISCONTINUITY:TYPE=“PGM”,PID=“X”##EXT-AZK-SEG:TIME=“2013-02-01T18:58:00”,KEY=“key- 99”,RATING=“PG-13”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/001-X/seg-00880.ts .. . ##EXT-AZK-SEG:TIME=“2013-02-01T18:59:50”,KEY=“key-99”,RATING=“PG-13” #EXTINF:10.0,http://cdn1.example.com/1/2013/02/01/001-X/seg-00999.ts#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-100#EXT-X-DISCONTINUITY:TYPE=“PGM”,PID=“Y”##EXT-AZK-SEG:TIME=“2013-02-01T19:00:00”,KEY=“key- 100”,RATING=“PG”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/002-Y/seg-01000.ts .. . ##EXT-AZK-SEG:TIME=“2013-02-01T19:10:00”,KEY=“key- 102”,RATING=“PG”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/002-Y/seg-01600.ts#EXT-X-DISCONTINUITY:TYPE=“PGM”,PID=“Z”#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-103##EXT-AZK-SEG:TIME=“2013-02-01T19:10:10”,KEY=“key- 103”,RATING=“R”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/003-Z/seg-01601.ts .. . ##EXT-AZK-SEG:TIME=“2013-02-01T19:12:10”,KEY=“key- 104”,RATING=“PG”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/003-Z/seg-01721.ts#EXT-X-ENDLIST

In one embodiment, the base URLs for segments in the variant manifestare modified to point to the proxy 106 where segments are cached foroff-line playback. In one embodiment, the generated master and variantmanifests for the program are cached locally in the proxy 106 uponinitial retrieval from the CDN 108 and subsequently served from thelocal cache. In one embodiment, the segments are pre-fetched from theCDN 108 and subsequently served from the local cache.

4. Advertisement Replacement

In one embodiment, if the npvr manifest contains advertisementindicators, the proxy 106 may replace the original advertisement fromthe source live content with an advertisement personalized for theindividual viewing the content. In one embodiment, the packager 104inserts comments into the npvr manifest denoting the position ofadvertisement boundaries, as shown for example in International PatentApplication Publication WO 2010/111261. In one embodiment, upondetecting the comment in the npvr manifest of an upcoming advertisement,the proxy 106 will issue a request to an advertisement decision manager(ADM) 114 and the ADM 114 will respond with an alternate advertisementto render. In one embodiment, the ADM 114 provides segment locations foran alternate advertisement. In another embodiment, the proxy 106requests the segment locations for the alternate advertisement from theWFM 102. When the proxy 106 generates the manifest file to present tothe client 110 media player, it will replace the segment URLs from thenpvr manifest, with the segment URLs for the alternate advertisement.

Extending the previous live playback example, the proxy 106 wouldgenerate a series of manifests as follows, replacing segments 1006through 1008 with alternate advertisement segments (adjusting theencryption key information accordingly, e.g., by selecting the last keyspecified before a given segment and applying the proper IV as required,as should be familiar to those skilled in the art):

#EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:4#EXT-X-MEDIA-SEQUENCE:1004#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key- 100,IV=0x3ec##EXT-AZK-SEG:TIME=“2013-02-01T19:00:40”,KEY=“key- 100”,RATING=“PG”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/002-Y/seg-01004.ts#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key- 100,IV=0x3ed##EXT-AZK-SEG:TIME=“2013-02-01T19:00:50”,KEY=“key- 100”,RATING=“PG”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/002-Y/seg-01005.ts#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-ad- 1,IV=0x1#EXT-X-DISCONTINUITY:TYPE=“POP”##EXT-AZK-SEG:TIME=“2013-02-01T19:01:00”,KEY=“key-ad- 1”,RATING=“PG”#EXTINF:10.0,http://cdn1.example.com/alternate/advertisement/seg-00001.ts #EXTM3U#EXT-X-TARGETDURATION:10 #EXT-X-VERSION:4 #EXT-X-MEDIA-SEQUENCE:1005#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-100#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key- 100,IV=0x3ed##EXT-AZK-SEG:TIME=“2013-02-01T19:00:50”,KEY=“key- 100”,RATING=“PG”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/002-Y/seg-01005.ts#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-ad- 1,IV=0x1#EXT-X-DISCONTINUITY:TYPE=“POP”##EXT-AZK-SEG:TIME=“2013-02-01T19:01:00”,KEY=“key-ad- 1”,RATING=“PG”#EXTINF:10.0,http://cdn1.example.com/alternate/advertisement/seg-00001.ts#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-ad- 1,IV=0x2##EXT-AZK-SEG:TIME=“2013-02-01T19:01:10”,KEY=“key-ad- 1”,RATING=“PG”#EXTINF:10.0,http://cdn1.example.com/alternate/advertisement/seg-00002.ts #EXTM3U#EXT-X-TARGETDURATION:10 #EXT-X-VERSION:4 #EXT-X-MEDIA-SEQUENCE:1#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-ad- 1,IV=0x1##EXT-AZK-SEG:TIME=“2013-02-01T19:01:00”,KEY=“key-ad- 1”,RATING=“PG”#EXTINF:10.0,http://cdn1.example.com/alternate/advertisement/seg-00001.ts#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-ad- 1,IV=0x2##EXT-AZK-SEG:TIME=“2013-02-01T19:01:10”,KEY=“key-ad- 1”,RATING=“PG”#EXTINF:10.0,http://cdn1.example.com/alternate/advertisement/seg-00002.ts#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-ad- 1,IV=0x3##EXT-AZK-SEG:TIME=“2013-02-01T19:01:20”,KEY=“key-ad- 1”,RATING=“PG”#EXTINF:10.0,http://cdn1.example.com/alternate/advertisement/seg-00003.ts #EXTM3U#EXT-X-TARGETDURATION:10 #EXT-X-VERSION:4 #EXT-X-MEDIA-SEQUENCE:2#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-ad- 1,IV=0x2##EXT-AZK-SEG:TIME=“2013-02-01T19:01:10”,KEY=“key-ad- 1”,RATING=“PG”#EXTINF:10.0,http://cdn1.example.com/alternate/advertisement/seg-00002.ts#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-ad- 1,IV=0x3##EXT-AZK-SEG:TIME=“2013-02-01T19:01:20”,KEY=“key-ad- 1”,RATING=“PG”#EXTINF:10.0,http://cdn1.example.com/alternate/advertisement/seg-00003.ts#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key- 100,IV=0x3f1#EXT-X-KEY:METHOD=AES-128,URI=http://localhost/key-100#EXT-X-DISCONTINUITY:TYPE=“PIP”##EXT-AZK-SEG:TIME=“2013-02-01T19:01:30”,KEY=“key- 100”,RATING=“PG”#EXTINF:10.0, http://cdn1.example.com/1/2013/02/01/002-Y/seg-01009.ts

In one embodiment, the proxy 106 is provided with a plurality of ADMservers 114 by the WFM 102. In one embodiment, the preferred ADM 114selected by the proxy 106 is based on a simple round robin scheme. Inanother embodiment, priorities for each ADM 114 are provided by the WFM102 and the proxy 106 selects the preferred ADM 114 using a weightedround robin scheme. In another embodiment, the proxy 106 selects thepreferred ADM 114 based on random selection. There are many algorithmsfor selecting a preferred server from a list of servers, as should beknown to those skilled in the art. It should be understood that anymethod for selecting a preferred ADM 114 should be considered valid foruse with the current invention.

In FIG. 2 is a block diagram for another embodiment. System 200 isidentical to system 100 with the exception of proxy 106 which isembedded within client 110.

In FIG. 3 is a flow chart for a process 300 performed at a packager 104for processing real-time streaming content and generating npvr manifestsfor use in real-time, time-shifted, or VoD playback.

In step 302, the packager 104 processes a next segment, where thesegment is compiled from transcoded real-time streaming input. In oneembodiment, the segment is generated to be of a fixed target duration.In one embodiment, the segment may be shorter than the fixed targetduration, e.g., the last segment before a program boundary or anadvertisement boundary may be shortened so that the first segment afterthe program or advertisement boundary starts on a new segment boundary.In one embodiment, program boundary information and/or advertisementboundary information is provided in-band via SCTE-35 cue tones. Inanother embodiment, program boundary information and/or advertisementboundary information is provided out-of-band via SCTE-118, SCTE-130, orother proprietary signaling protocols. There are numerous ways to signalprogram boundary information and/or advertisement boundary information,as should be known to those skilled in the art. It should be understoodthat any method for detecting program boundary information and/oradvertisement boundary information should be considered valid for usewith the current invention.

In step 304, the packager 104 checks to see if a program boundary or anadvertisement boundary has been reached. If a program boundary or anadvertisement boundary has not yet been reached, processing continues tostep 308 where the current npvr manifest is updated with the new segmentinformation and uploaded to the CDN(s) 108 after the new segment isuploaded the CDN(s) 108. If a program boundary or an advertisementboundary has been reached, processing continues to step 306 where thepackager creates new directories in the CDN(s) 108 for the next program,updates the current npvr manifest with the new segment information,completes the current npvr manifest by adding a next npvr manifestpointer and ENDLIST tag, and creates a new npvr manifest file for thenew program, before proceeding to step 308, where the segment and bothmanifests (current and new) are uploaded to the CDN(s) 108.

In FIG. 4 is a flow chart describing a process 400 performed at a proxy106 for generating sliding window manifest files for the client 110 forreal-time playback of real-time streaming content.

In step 402, the proxy 106 receives a request from client 110 for themaster manifest. The master manifest contains a list of variant manifestURLs corresponding to different available encodings (e.g., differentbitrate/resolution audio/video and/or different language audio andsubtitles). In one embodiment, the variant manifest URLs point to backto the proxy 106. In one embodiment, the variant manifest URLs containthe wall clock timestamp of the master manifest request. In oneembodiment, the proxy 106 determines the available bitrates based oninformation provided by the WFM 102. In another embodiment, the proxy106 determines the available bitrates based on the master manifestproduced by the packager 104 and placed in the CDNs 108. In oneembodiment, the proxy 106 determines a subset of bitrates to present tothe client 110. In one embodiment, the set of bitrates is determinedbased on user restrictions configured for client 110 by the WFM 102. Inanother embodiment, the set of bitrates is determined based on networkrestrictions provided by the WFM 102. In another embodiment, the set ofbitrates is determined based on the current network load estimated bythe proxy 106 based on the aggregate number of manifest requests andtheir corresponding bitrates seen within a given time window (e.g., thelast 30 seconds). Techniques for these operations are described inInternational Patent Application Publication WO 2011/139305). The proxy106 returns the master manifest to the client 110 and proceeds to step404.

In step 404, the proxy 106 receives a variant manifest request from theclient 110, for a specific bitrate. In one embodiment, the proxy 106chooses a CDN 108 from which the client 110 should retrieve segments. Inone embodiment, the CDN 108 is selected based on a strict prioritizationprovided by the WFM 102. In another embodiment, the CDN 108 is selectedbased on a round-robin or weighted round-robin scheme where the weightsare provided by the WFM 102. In another embodiment, the CDN 108 isselected based on aggregate latency measurements for manifest and/orsegment retrievals performed by the proxy 106 within a given time window(e.g., the last 30 seconds). In another embodiment, the CDN 108 isselected based on aggregate bandwidth measurements for manifest and/orsegment retrievals performed by the proxy 106 within a given time window(e.g., the last 30 seconds). Techniques for CDN selection are describedin US Patent Application Publication US 2012/0240176. In one embodiment,the proxy 106 chooses a bitrate to serve to the client 110, where thebitrate may be lower than the bitrate requested by the client 110. Inone embodiment, the bitrates is determined based on user restrictionsconfigured for client 110 by the WFM 102. In another embodiment, thebitrate is determined based on network restrictions provided by the WFM102. Techniques for bitrate selection are described in InternationalPatent Application Publication WO 2011/139305. In another embodiment,the bitrate is determined based on the current network load estimated bythe proxy 106 based on the aggregate number of manifest requests andtheir corresponding bitrates seen within a given time window (e.g., thelast 30 seconds). In another embodiment, the bitrate is selected basedon aggregate latency measurements for manifest and/or segment retrievalsfrom the CDN 108 performed by the proxy 106 within a given time window(e.g., the last 30 seconds). In another embodiment, the bitrate isselected based on aggregate bandwidth measurements for manifest and/orsegment retrievals from the CDN 108 performed by the proxy 106 within agiven time window (e.g., the last 30 seconds).

In step 404, the proxy 106 also determines the segment range required tofulfill the request. In one embodiment, the proxy 106 stores the segmentrange from the previous manifest request, or from the previous playbackaction (i.e., pause, play, rewind, fast forward). In another embodiment,the client 110 provides a target wall-clock time for the previousplayback action (i.e., pause, play, rewind, fast forward). In oneembodiment, the client 110 restarts the media player on each playbackaction which results in new master manifest requests, which results innew variant manifest URLs generated with the current wall-clock time forthat playback action. In another embodiment, the wall-clock timestamp iscalculated by the client 110 as the wall-clock time corresponding to thevideo position of the last playback action (i.e., start, pause, rewind,fast forward), plus the duration of playback since the last playbackaction (e.g., based off of a free running timer or using presentationtimestamp differentials from the media player) plus or minus the numberof seconds the user wishes to either fast forward or rewind,respectively. There are many methods of tracking playback position andprogress as should be known to those skilled in the art, it should beunderstood that any method for determining the target wall-clock timeshould be suitable for the current invention.

Once the segment range is determined and the bitrate and CDN have beenselected, processing continues to step 416 where the proxy 106 checks tosee if the already cached npvr manifest files contain the necessarysegment information to fulfill the request. If the already cached npvrmanifest files do not contain the necessary segment information,processing continues to step 418 where the proxy 106 retrieves theneeded npvr manifest file. If the client 110 is currently playing thereal-time streaming content, the proxy 106 retrieves the most recentnpvr manifest from the selected CDN 108 for the selected bitrate. In oneembodiment, the proxy 106 retrieves only the portion of the most recentnpvr manifest that it does not already have cached. In one embodiment,the proxy 106 uses an HTTP range request to retrieve only those bytesstarting from one greater than the last byte previously retrieved untilthe current end of file. Otherwise, if the client 110 is not currentlyplaying the real-time streaming content, the location of the needed npvrmanifest must be determined. In one embodiment, the proxy 106 uses thenext npvr manifest pointers to find the npvr manifest which contains thetarget segment corresponding to the target wall-clock time by walkingthe npvr manifest chain pointers until an npvr manifest is found whichcontains the target wall-clock time. This may require retrievingmultiple npvr manifest files from the selected CDN 108. In anotherembodiment, the proxy 106 uses information provided by the WFM 102 todetermine the npvr manifest associated with the target wall-clock time.In one embodiment, the proxy 106 periodically syncs npvr manifestinformation from the WFM 102 (e.g., using streaming databasereplication). In another embodiment, the proxy 106 retrieves npvrmanifest information from a shared distributed database managed andupdated by the WFM 102. Once the need npvr manifest location isdetermined, the proxy 106 retrieves the needed npvr manifest from theselected CDN 108 for the selected bitrate.

If the necessary segments were found locally cached in step 416processing continues directly to step 410. Otherwise, after retrievingthe needed npvr manifest, processing continues to step 410 where theproxy 106 checks to see if sufficient segments exist in the current npvrmanifest to generate the sliding window manifest. If insufficientsegments exist, processing continues to step 412, where the proxy 106uses the previous npvr manifest to get the requisite number of segments(e.g., three) to generate the sliding window manifest. If the previousnpvr manifest is not locally cached, the proxy 106 retrieves theprevious npvr manifest using the previous npvr manifest pointer URL. Inone embodiment, the proxy 106 always caches the two most recent npvrmanifest files so that it can easily handle boundary crossingconditions. In one embodiment, the proxy 106 caches all previouslydownloaded completed npvr manifest files.

If the necessary segments were found in the current manifest in step 410processing continues directly to step 406. Otherwise, after consultingthe previous npvr manifest, processing continues to step 406 where theproxy 106 checks to see if current npvr manifest is now complete. If thecurrent npvr manifest is complete, processing continues to step 408. Inone embodiment, the proxy 106 maintains session state and updates thecurrent manifest to be the next npvr manifest indicated by the next npvrmanifest pointer, before continuing to step 414. If the npvr manifestwas not complete in step 406, processing continues directly to step 414.

In step 414, the proxy 106 generates a sliding window manifestcontaining the selected N segments and returns it to the client 110. Inone embodiment, if the current sliding window manifest containsadvertisement segments, when generating the sliding window manifest instep 414, the proxy 106 replaces the segments specified in the npvrmanifest with alternate advertisement segments. In one embodiment, theproxy 106 detects an upcoming advertisement based on comments in thenpvr manifest. In one embodiment, the proxy 106 issues a request to theADM 114 to determine which alternate advertisement to present to theclient 110. In one embodiment, the alternate advertisement segmentlocations are specified by the ADM 114. In another embodiment, the proxy106 retrieves the alternate advertisement segment locations, for thealternate advertisement specified by the ADM 114, from the WFM 102.

In FIGS. 5A and 5B are flow charts describing processes 500A and 500Bperformed at a proxy 106 for handling playback action requests (i.e.,pause, play, rewind, and fast forward) from the client 110 to enabletime-shifted payback of real-time streaming content. As notedpreviously, each of these playback actions is followed by a new manifestrequest generated by the client 110 media player, substantiallyimmediately for rewind and fast forward and upon resumption of playbackin the case of a pause. In one embodiment shown in FIG. 5A, the playbackaction request is a direct API call into the proxy 106. In anotherembodiment shown in FIG. 5B, the playback action is handled in theclient 110, and the client 110 generates a target wall-clock timestampcorresponding to the target playback position of the playback action(i.e., play after pause, rewind, or fast forward). In one embodiment,the play after pause target wall-clock timestamp is calculated as thewall-clock time corresponding to the video position of the last playbackaction (i.e., start, pause, rewind, fast forward), plus the duration ofplayback since the last playback action (e.g., based off of a freerunning timer or using presentation timestamp differentials from themedia player). In one embodiment, rewind target wall-clock timestamp iscalculated as the wall-clock time corresponding to the video position ofthe last playback action (i.e., start, pause, rewind, fast forward),plus the duration of playback since the last playback action (e.g.,based off of a free running timer or using presentation timestampdifferentials from the media player) minus the number of seconds theuser wishes to rewind. In one embodiment, fast forward target wall-clocktimestamp is calculated as the wall-clock time corresponding to thevideo position of the last playback action (i.e., start, pause, rewind,fast forward), plus the duration of playback since the last playbackaction (e.g., based off of a free running timer or using presentationtimestamp differentials from the media player) plus the number ofseconds the user wishes to fast forward. There are many methods oftracking playback position and progress as should be known to thoseskilled in the art, it should be understood that any method fordetermining playback position (i.e., the wall-clock time correspondingto the last playback action) should be suitable for the currentinvention, for use in calculating target wall-clock timestamps.

Process 500A begins with step 502 where the proxy 106 receives atime-shift request (i.e., pause, fast forward, or rewind) from theclient 110. Processing then continues to step 508 where the proxy 106checks to see if the time-shift request was a pause request. If therequest was a pause request, processing continues to step 510 where theproxy 106 notes the most recent segment served to the client 110 (andthe segment's associated wall-clock timestamp) and then proceeds to step526. In one embodiment, the proxy 106 maintains session state regardingwhether or not the client 110 is currently viewing the real-timestreaming content (denoted by a live streaming flag set to true) orwhether the client 110 is timeshifted (denoted by a live streaming flagset to false). When a pause operation occurs, the live streaming flag isset to false.

If the request was not a pause request, processing continues to step 512where the proxy 106 checks to see if the time-shift request was a rewindrequest. If the request was a rewind request, processing continues tostep 514 where the proxy 106 notes the wall-clock timestamp of the mostrecent segment served to the client 110, calculates a rewind targetwall-clock time for the next segment to serve to the client 110 bysubtracting the rewind distance from the most recent segment'sassociated wall-clock timestamp, searches backward in the current npvrmanifest for the segment which corresponds to the rewind targettimestamp (downloading additional npvr manifest files as necessary tosearch additional npvr manifests for rewind requests which span programboundaries), and notes the rewind target segment along with the rewindtarget timestamp, then proceeds to step 526. In one embodiment, if therewind target wall-clock time does not reside in the current npvrmanifest, the proxy 106 uses the previous npvr manifest pointers to findthe npvr manifest which contains the target segment corresponding to therewind target wall-clock time by walking the npvr manifest chainpointers until an npvr manifest is found which contains the rewindtarget wall-clock time. In another embodiment, the proxy 106 usesinformation provided by the WFM 102 to determine the npvr manifestassociated with the rewind target wall-clock timestamp. In oneembodiment, the proxy 106 periodically syncs npvr manifest informationfrom the WFM 102 (e.g., using streaming database replication). Inanother embodiment, the proxy 106 retrieves npvr manifest informationfrom a shared distributed database managed and updated by the WFM 102.In one embodiment, the proxy 106 maintains session state regardingwhether or not the client 110 is currently viewing the real-timestreaming content (denoted by a live streaming flag set to true) orwhether the client 110 is timeshifted (denoted by a live streaming flagset to false). When a rewind operation occurs, the live streaming flagis set to false.

If the request was not a rewind request, processing continues to step516 where the proxy 106 checks to see if the time-shift request is afast forward request. If the request was not a fast forward request,processing continues to step 524 where an “unknown action” error isgenerated. In the illustrated embodiment an error can be inferredbecause only pause, fast forward, and rewind are supported. Othererror-detection logic may be employed in alternative embodiments,especially those having additional valid, non-error request types. If at516 the request is a fast forward request, processing continues to step518 where the proxy 106 notes the wall-clock timestamp of the mostrecent segment served to the client 110, calculates a fast forwardwall-clock target time for the next segment to serve to the client 110by adding the fast forward distance to the most recent segment'sassociated wall-clock timestamp, and checks to see if the fast forwardtarget wall-clock time is in the future, i.e., beyond the timestamp ofthe most recent real-time segment generated by the packager 104. If thefast forward target time is in the future, i.e., beyond the timestamp ofthe most recent real-time segment generated by the packager 104,processing continues to step 522 where the proxy 106 generates areal-time streaming variant manifest using the most recent N segmentsfrom the most recent npvr manifest generated by the packager 104. In oneembodiment, the proxy 106 maintains session state regarding whether ornot the client 110 is currently viewing the real-time streaming content(denoted by a live streaming flag set to true). If the live streamingflag is already set in step 522, there is nothing that needs to be done.If the live streaming flag is not already set in step 522, the livestreaming flag is set so that subsequent fast forward requests may beignored.

If at 518 the fast forward target time is still within the range ofalready processed segments, processing continues to step 520 where theproxy 106 searches forward in the current npvr manifest for the segmentwhich corresponds to the fast forward target timestamp (downloadingadditional npvr manifest files as necessary to search additional npvrmanifests for fast forward requests which span program boundaries), andthen proceeds to step 526. In one embodiment, if the fast forward targetwall-clock time does not reside in the current npvr manifest, the proxy106 uses the next npvr manifest pointers to find the npvr manifest whichcontains the target segment corresponding to the fast forward targetwall-clock time by walking the npvr manifest chain pointers until annpvr manifest is found which contains the fast forward target wall-clocktime. In another embodiment, the proxy 106 uses information provided bythe WFM 102 to determine the npvr manifest associated with the fastforward target wall-clock timestamp. In one embodiment, the proxy 106periodically syncs npvr manifest information from the WFM 102 (e.g.,using streaming database replication). In another embodiment, the proxy106 retrieves npvr manifest information from a shared distributeddatabase managed and updated by the WFM 102. In one embodiment, theproxy 106 maintains session state regarding whether or not the client110 is currently viewing the real-time streaming content (denoted by alive streaming flag set to true) or whether the client 110 istimeshifted (denoted by a live streaming flag set to false). When a fastforward operation occurs that does not result in resuming the real-timestream, the live streaming flag should already be set to false, but maybe reset to false for good measure.

In step 526, the proxy 106 receives a variant manifest request from theclient 110, for a specific bitrate. In one embodiment, the proxy 106chooses a CDN 108 from which the client 110 should retrieve segments. Inone embodiment, the CDN 108 is selected based on a strict prioritizationprovided by the WFM 102. In another embodiment, the CDN 108 is selectedbased on a round-robin or weighted round-robin scheme where the weightsare provided by the WFM 102. In another embodiment, the CDN 108 isselected based on aggregate latency measurements for manifest and/orsegment retrievals performed by the proxy 106 within a given time window(e.g., the last 30 seconds). In another embodiment, the CDN 108 isselected based on aggregate bandwidth measurements for manifest and/orsegment retrievals performed by the proxy 106 within a given time window(e.g., the last 30 seconds). In one embodiment, the proxy 106 chooses abitrate to serve to the client 110, where the bitrate may be lower thanthe bitrate requested by the client 110. In one embodiment, the bitratesis determined based on user restrictions configured for client 110 bythe WFM 102. In another embodiment, the bitrate is determined based onnetwork restrictions provided by the WFM 102. In another embodiment, thebitrate is determined based on the current network load estimated by theproxy 106 based on the aggregate number of manifest requests and theircorresponding bitrates seen within a given time window (e.g., the last30 seconds). In another embodiment, the bitrate is selected based onaggregate latency measurements for manifest and/or segment retrievalsfrom the CDN 108 performed by the proxy 106 within a given time window(e.g., the last 30 seconds). In another embodiment, the bitrate isselected based on aggregate bandwidth measurements for manifest and/orsegment retrievals from the CDN 108 performed by the proxy 106 within agiven time window (e.g., the last 30 seconds).

The proxy 106 generates a sliding window manifest for the selectedbitrate and CDN 108 working backward from the target segment determinedin either step 510, 514, or 520. The proxy 106 returns the slidingwindow manifest to the client 110 and waits for a new request. Forsubsequent variant manifest requests, processing proceeds back to step526 where the proxy 106 increments the target segment (following nextnpvr manifest pointers for increments which span program boundaries) andgenerates an updated sliding window variant manifest to return to theclient 110. In one embodiment, if the sliding window manifestcorresponding to the target time contains advertisement segments, whengenerating the sliding window manifest in step 526, the proxy 106replaces the segments specified in the npvr manifest with alternateadvertisement segments. In one embodiment, the proxy 106 detects anupcoming advertisement based on comments in the npvr manifest. In oneembodiment, the proxy 106 issues a request to the ADM 114 to determinewhich alternate advertisement to present to the client 110. In oneembodiment, the proxy 106 optimizes requests to the ADM 114 if thetarget segment is an advertisement segment, by retrieving the npvrmanifest for the target segment, determining if advertisement segmentsare required, and issuing the request to the ADM 114 in step 510, 514,or 520, prior to receiving the variant manifest request in step 526. Inone embodiment, the alternate advertisement segment locations arespecified by the ADM 114. In another embodiment, the proxy 106 retrievesthe alternate advertisement segment locations, for the alternateadvertisement specified by the ADM 114, from the WFM 102.

It should be noted that the playback action API call which triggers theprocess in step 502 may be independent and asynchronous from the processof handling variant manifest requests in step 526. Though it is drawn asa single process in FIG. 5A, the steps 502-524 represent the process forchanging the state (i.e., the target segment) used by the manifestgeneration task described in step 526. In one embodiment, the process insteps 502-524 forces a restart or reinitialization of the manifestgeneration task in step 526, which effectively makes step 526 adependent step in process 500A. In another embodiment, the process insteps 502-524 simply update the current segment and current npvrmanifest variables of an independent manifest generation task (e.g., aseparate operating system thread or operating system process) in step526.

Turning now to FIG. 5B, process 500B begins with step 550, where theclient 110 receives a time-shift request (i.e., pause, fast forward, orrewind) from the user. Processing then continues to step 558 where theclient 110 checks to see if the time-shift request was a pause request.If the request was a pause request, processing continues to step 560where the proxy 106 notes the current playback wall-clock timestamp andthen proceeds to step 576. In one embodiment, the current playbackwall-clock timestamp is calculated as the wall-clock time correspondingto the video position of the last playback action (i.e., start, pause,rewind, fast forward), plus the duration of playback since the lastplayback action (e.g., based off of a free running timer or usingpresentation timestamp differentials from the media player). There aremany methods of tracking playback position and progress as should beknown to those skilled in the art, it should be understood that anymethod for determining playback position (i.e., the wall-clock timecorresponding to the last playback action) should be suitable for thecurrent invention, for use in calculating current playback wall-clocktimestamp. In one embodiment, the client 110 maintains session stateregarding whether or not the user is currently viewing the real-timestreaming content (denoted by a live streaming flag set to true) orwhether the user is timeshifted (denoted by a live streaming flag set tofalse). When a pause operation occurs, the live streaming flag is set tofalse.

If at 558 the request was not a pause request, processing continues tostep 562 where the client 110 checks to see if the time-shift requestwas a rewind request. If the request was a rewind request, processingcontinues to step 564 where the client 110 calculates a rewind targetwall-clock time by subtracting the rewind distance from the currentplayback wall-clock timestamp, then proceeds to step 576. In oneembodiment, the current playback wall-clock timestamp is calculated asthe wall-clock time corresponding to the video position of the lastplayback action (i.e., start, pause, rewind, fast forward), plus theduration of playback since the last playback action (e.g., based off ofa free running timer or using presentation timestamp differentials fromthe media player). There are many methods of tracking playback positionand progress as should be known to those skilled in the art, it shouldbe understood that any method for determining playback position (i.e.,the wall-clock time corresponding to the last playback action) should besuitable for the current invention, for use in calculating currentplayback wall-clock timestamp. In one embodiment, the client 110maintains session state regarding whether or not the user is currentlyviewing the real-time streaming content (denoted by a live streamingflag set to true) or whether the client 110 is timeshifted (denoted by alive streaming flag set to false). When a rewind operation occurs, thelive streaming flag is set to false.

If at 562 the request was not a rewind request, processing continues tostep 566 where the proxy 106 checks to see if the time-shift request wasa fast forward request. If the request was not a fast forward request,processing continues to step 574 where an “unknown action” error isgenerated, as only pause, fast forward, and rewind are supported in theillustrated embodiment. As for process 500A, other error logic may beemployed in embodiments supporting additional valid, non-error requesttypes. If at 566 the request was a fast forward request, processingcontinues to step 568 where the client 110 calculates a fast forwardwall-clock target time by adding the fast forward distance to thecurrent playback wall-clock timestamp. In one embodiment, the currentplayback wall-clock timestamp is calculated as the wall-clock timecorresponding to the video position of the last playback action (i.e.,start, pause, rewind, fast forward), plus the duration of playback sincethe last playback action (e.g., based off of a free running timer orusing presentation timestamp differentials from the media player). Thereare many methods of tracking playback position and progress as should beknown to those skilled in the art, it should be understood that anymethod for determining playback position (i.e., the wall-clock timecorresponding to the last playback action) should be suitable for thecurrent invention, for use in calculating current playback wall-clocktimestamp. The client also checks to see if the fast forward targetwall-clock time is in the future, i.e., beyond the current wall-clocktime of the client 110 operating system. If the fast forward target timeis not the future, i.e., before the current wall-clock time of theclient 110 operating system, processing continues to step 576. If thefast forward target time is the future, i.e., beyond the currentwall-clock time of the client 110 operating system, processing continuesto step 578, where the client 110 checks to see if the user is alreadyviewing the real-time streaming content. In one embodiment, the client110 maintains session state regarding whether or not the user iscurrently viewing the real-time streaming content (denoted by a livestreaming flag set to true). In another embodiment, the client 110always assumes the user is not currently viewing the real-time streamingcontent (denoted by a live streaming flag set to false). When a fastforward operation occurs that does not result in resuming the real-timestream, the live streaming flag should already be set to false, but maybe reset to false for good measure.

In step 572, the live streaming flag is already set to true, then thereis no reason to try to resume playback of the real-time streamingcontent, since the user is already viewing the real-time streamingcontent, so processing continues to step 580 where the client 110ignores the request. If the live streaming flag not set to true,processing continues to step 572 where the client 110 sets the targetwall-clock timestamp equal to the current wall-clock time of the client110 operating system and the live streaming flag is set to true.Processing then continues to step 576.

In step 576, the client 110 resets the media player and restarts it witha new master manifest request URL containing the new target wall-clocktimestamp, to be handled by the proxy 106.

In FIG. 6 is a flow chart describing a process 600 performed at a proxy106 for generating VoD manifest files for playback of previouslyrecorded real-time content. In step 602, the proxy 106 receives arequest from client 110 for the master manifest. The master manifestcontains a list of variant manifest files corresponding to differentavailable bitrates. In one embodiment, the proxy 106 determines theavailable bitrates based on information provided by the WFM 102. Inanother embodiment, the proxy 106 determines the available bitratesbased on the master manifest produced by the packager 104 and placed inthe CDN 108. In one embodiment, the proxy 106 determines a subset ofbitrates to present to the client 110. In one embodiment, the set ofbitrates is determined based on user restrictions configured for client110 by the WFM 102. In another embodiment, the set of bitrates isdetermined based on network restrictions provided by the WFM 102. Inanother embodiment, the set of bitrates is determined based on thecurrent network load estimated by the proxy 106 based on the aggregatenumber of manifest requests and their corresponding bitrates seen withina given time window (e.g., the last 30 seconds). The proxy 106 returnsthe master manifest to the client 110 and proceeds to step 604.

In step 604, the proxy 106 receives a variant manifest request from theclient 110, for a specific bitrate. In one embodiment, the proxy 106chooses a CDN 108 from which the client 110 should retrieve segments. Inone embodiment, the CDN 108 is selected based on a strict prioritizationprovided by the WFM 102. In another embodiment, the CDN 108 is selectedbased on a round-robin or weighted round-robin scheme where the weightsare provided by the WFM 102. In another embodiment, the CDN 108 isselected based on aggregate latency measurements for manifest and/orsegment retrievals performed by the proxy 106 within a given time window(e.g., the last 30 seconds). In another embodiment, the CDN 108 isselected based on aggregate bandwidth measurements for manifest and/orsegment retrievals performed by the proxy 106 within a given time window(e.g., the last 30 seconds). In one embodiment, the proxy 106 chooses abitrate to serve to the client 110, where the bitrate may be lower thanthe bitrate requested by the client 110. In one embodiment, the bitratesis determined based on user restrictions configured for client 110 bythe WFM 102. In another embodiment, the bitrate is determined based onnetwork restrictions provided by the WFM 102. In another embodiment, thebitrate is determined based on the current network load estimated by theproxy 106 based on the aggregate number of manifest requests and theircorresponding bitrates seen within a given time window (e.g., the last30 seconds). In another embodiment, the bitrate is selected based onaggregate latency measurements for manifest and/or segment retrievalsfrom the CDN 108 performed by the proxy 106 within a given time window(e.g., the last 30 seconds). In another embodiment, the bitrate isselected based on aggregate bandwidth measurements for manifest and/orsegment retrievals from the CDN 108 performed by the proxy 106 within agiven time window (e.g., the last 30 seconds). The proxy 106 retrievesthe first npvr manifest corresponding to the program start time from theselected CDN 108 for the selected bitrate.

Processing then continues to step 606 where the proxy 106 checks to seeif the program spans multiple npvr manifests (i.e., the first npvrmanifest retrieved in step 604 does not contain all the segmentsnecessary to create a VoD manifest for the requested program). If thefirst manifest contains all the necessary segments, processing continuesto step 610. If the first manifest does not contain the necessarysegments, processing continues to step 608 where the proxy 106 retrievesadditional manifest files using the next sequential manifest pointers,concatenating the segment information and removing unnecessary tags asshould be familiar to those skilled in the art, before continuing tostep 610.

In step 610, the proxy 106 checks to see if the wall-clock timestamp ofthe first segment in the first npvr manifest aligns with the start timeof the program. If the wall-clock timestamps align, processing continuesto step 614. If the timestamps do not align, processing continues tostep 612 where the proxy 106 trims out those initial segments whosewall-clock timestamps do not overlap with the wall-clock time range ofthe program (adjusting the encryption key information accordingly, e.g.,by selecting the last key specified before the current segment andapplying the proper IV as required, as should be familiar to thoseskilled in the art), before continuing to step 614.

In step 614, the proxy 106 checks to see if the wall-clock timestamp ofthe last segment in the last npvr manifest aligns with the start time ofthe program. If the wall-clock timestamps align, processing continues tostep 618. If the timestamps do not align, processing continues to step616 where the proxy 106 trims out those trailing segments whosewall-clock timestamps do not overlap with the wall-clock time range ofthe program, before continuing to step 618.

In step 618, the proxy 106 uses the remaining segments to generate theVoD manifest file and returns it to the client 110. In one embodiment,if the variant manifest contains advertisement segments, when generatingthe variant manifest in step 618, the proxy 106 replaces theadvertisement segments specified in the npvr manifest(s) with alternateadvertisement segments. In one embodiment, the proxy 106 issues one ormore requests to the ADM 114 (one for each advertisement) to determinewhich alternate advertisement(s) to present to the client 110. In oneembodiment, the alternate advertisement segment locations are specifiedby the ADM 114. In another embodiment, the proxy 106 retrieves thealternate advertisement segment locations, for the alternateadvertisement(s) specified by the ADM 114, from the WFM 102.

Thus a method is disclosed for processing content to support networkpersonal video recorder functions, including

-   -   continually performing the steps of (i) acquiring real-time        streaming source content containing a program, (ii) transcoding        the acquired source content into distinct encodings to create        respective content streams, and (iii) segmenting the content        streams into segments and uploading the segments to one or more        content delivery networks (CDNs) for retrieval and use in        rendering the program at a media player;    -   generating manifests for the program and continually updating        the manifests and uploading the updated manifests to the CDNs as        the segments are uploaded to the CDNs, the manifests including a        master manifest and set of network-personal-video-recorder        (npvr) manifests for respective ones of the encodings, the        master manifest including references to the set of npvr        manifests to enable selection from among the encodings in        rendering the program at the media player; and    -   detecting a program boundary of the program in the source        content, and in response:    -   completing a current set of npvr manifests in current        directories of the CDNs;    -   creating new directories in the CDNs and starting a new set of        npvr manifests in the new directories; and    -   uploading subsequent segments and npvr manifest updates to the        new directories.

The source content may be audio/video content.

The program boundaries may be specified in-band with the content (e.g.,SCTE-35 cue tones).

The program boundaries may be specified out-of-band based off ofwall-clock times (e.g., SCTE-118, proprietary EPG data, or fixedduration time schedules).

The new directories for each program may have a hierarchical directorystructure having distinct hierarchical levels based on the programboundaries, the date and time the program is processed, and respectiveidentifiers of the source stream and encoding.

A new encryption key may be generated for each new program.

An existing encryption key may be carried over to a new program npvrmanifest.

The master manifest may be an HTTP Live Streaming master manifest, thesegments HTTP Live Streaming segments, and the npvr manifestsnon-sliding-window variant stream manifests that continuously grow untilcomplete and then are ended with an ENDLIST tag, each npvr manifestincluding sequential references to all the segments of the program.

The program may span multiple sequential npvr manifests, and the methodfurther include adding pointers to each npvr manifest to identify asequentially preceding npvr manifest and a sequentially following npvrmanifest.

The method may further include detecting advertisement boundaries andincluding advertisement boundary information in the npvr manifests toidentify discontinuities in the content stream.

The advertisement boundaries may be detected based on in-band SCTE-35cue tones and SCTE-130 placement opportunity information.

The advertisement boundaries may be provided out-of-band based off ofwall-clock times.

Comments may be added to the npvr manifests to denote first and lastsegments that contain the advertisement.

A disclosed method for rendering content, the content available in oneor more distinct encodings each including a respective set of sequentialsegments, includes:

-   -   proxying a manifest request from a media player to a content        server;    -   selecting a preferred encoding for requested content to be        delivered;    -   determining a set of npvr manifests required to satisfy the        content request and obtaining a selected one of the set of npvr        manifests associated with the selected encoding, the npvr        manifests specifying locations of segments of the respective        encodings;    -   constructing a variant manifest from the selected npvr manifest;        and    -   providing the variant manifest to the media player for use in        obtaining the segments of the respective encoding for playback        of the content.

The method may further include:

-   -   detecting specified segments in the content corresponding to        advertisements that may be replaced;    -   selecting a preferred advertisement server from a plurality of        advertisement servers;    -   querying the preferred advertisement server for an alternate        advertisement; and    -   replacing the specified segments in the npvr manifest with        segments specified by the preferred advertisement server in a        variant stream manifest.

The method may further include:

-   -   selecting a preferred content delivery network (CDN) from a        plurality of CDNs containing identical content and rewriting        segment uniform resource locators (URLs) of an npvr manifest;        and    -   replacing a first base URL pointing to an original CDN with a        second base URL of the preferred CDN in a variant stream        manifest.

A variant manifest may be constructed as a sliding-window variantmanifest by adding a new reference to a next segment and removing anexisting reference to an earliest segment in a predetermined window ofmost recent segments.

The content may be live streaming content and the sliding-window variantmanifest continually updated as new segments of the live streamingcontent are generated to function as a live streaming manifest forreal-time playback of the live streaming content by the media player.

The continual updating of the sliding-window variant manifest mayinclude:

-   -   finding and retrieving a most recent npvr manifest;    -   if the most recent npvr manifest contains all the most recent        segments in the predetermined window, then extracting the        segments from the most recent npvr manifest;    -   if the most recent npvr manifest does not contain all the most        recent segments in the predetermined window, then finding a next        sequentially preceding npvr manifest and extracting the most        recent segments in the predetermined window from both the most        recent and next sequentially preceding npvr manifests; and    -   constructing the live streaming manifest from the extracted        segments.

The method may further include retrieving updates for the most recentnpvr manifest periodically.

The method may further include using a byte range request to limit theamount of data retrieved in subsequent npvr manifest retrievals byrequesting only data beyond the byte range of the previous npvr manifestretrieval through the end of file.

The method may further include:

detecting completion of a current npvr manifest;

determining a location for a next sequential npvr manifest; and

issuing subsequent requests to the location of the next sequential npvrmanifest.

The content may be live streaming content and the sliding-window variantmanifest created based on a target segment of a time-shift playbackrequest to function as a time-shifted manifest for time-shifted playbackof a portion of the live streaming content by the media player.

The method may further include:

-   -   finding and retrieving an offset npvr manifest containing the        target segment;    -   if the offset npvr manifest contains all the most recent        segments in the predetermined window, then extracting the        segments from the offset npvr manifest;    -   if the offset npvr manifest does not contain all the most recent        segments in the predetermined window, then finding a next        sequentially preceding or following npvr manifest and extracting        the most recent segments in the predetermined window from both        the offset and next sequentially preceding or following npvr        manifests; and    -   constructing the time-shifted manifest from the extracted        segments.

The method may further include using monotonically increasing sequencenumbers in the time-shifted manifest to simulate a continuous streamingplayback, while maintaining a mapping between a current time-shiftedmanifest sequence number and a sequence number of the target segment.

The method may further include restarting the media player and resettingthe time-shifted manifest sequence number whenever a new seek operationoccurs.

The method may further include restarting the media player and switchingto a live manifest file if a seek request goes beyond the most recentsegment generated.

The method may further include inserting discontinuity indicators intothe time-shifted manifest when the time-shift playback request involvesa seek to a new playback position.

Finding the offset manifest may include calculating a relative time froma most recently used segment in a most recently used npvr manifest, andidentifying the npvr manifest corresponding to the relative time as theoffset manifest.

The offset may be calculated based on a specific user's aggregateplayback requests since a last media player restart, the calculationincreasing the offset for time watched and fast forward operations, anddecreasing the offset for rewind operations.

Constructing the variant manifest as a sliding-window variant manifestmay include finding and retrieving multiple most recent npvr manifeststo extract all the most recent segments in the predetermined window fromthe most recent npvr manifests, with the method further including (i)caching most recently completed npvr manifests and (ii) retrieving themost recent npvr manifests from the cached completed npvr manifests.

The method may further include:

-   -   finding a proper encryption key to be associated with each        segment in the variant manifest;    -   using the proper encryption key for each segment in the variant        manifest; and    -   adjusting initialization vector (IV) information for the proper        encryption key to correspond with the each segment in the        variant manifest.

The content may be recorded content and a variant manifest constructedas a video-on-demand (VOD) non-sliding-window variant manifest usablefor VOD playback of the recorded content by the media player.

The method may further include:

-   -   finding and retrieving a first npvr manifest referred to as a        start manifest which contains a starting time for the program,        and finding a first segment referred to as a start segment in        the start manifest, the start segment having a start time most        closely preceding a desired program start time;    -   finding and retrieving a second npvr manifest referred to as an        end manifest which contains and ending time for the program, and        finding a second segment referred to as an end segment in the        end manifest, the end segment having an end time most closely        following the desired program end time;    -   retrieving all npvr manifests corresponding to a time between        the start manifest and the end manifest; and    -   constructing the VoD non-sliding-window variant manifest by        concatenating all npvr manifests starting with the start        manifest and ending with the end manifest, while excluding        segments preceding the start segment in the start manifest and        segments following the end segment in the end manifest.

The set of npvr manifests may define a program is determined based offof a contiguous wall-clock time range.

The method may further include personalizing the time range based on aspecific user's personal recording criteria.

The above methods are usable together and/or independently. They may berealized in respective computerized devices.

While various embodiments of the invention have been particularly shownand described, it will be understood by those skilled in the art thatvarious changes in form and details may be made therein withoutdeparting from the spirit and scope of the invention as defined by theappended claims.

What is claimed is:
 1. A method for processing content to supportnetwork personal video recorder functions, comprising: continuallyperforming the steps of (i) acquiring real-time streaming source contentcontaining a program, (ii) transcoding the acquired source content intodistinct encodings to create respective content streams, and (iii)segmenting the content streams into segments and uploading the segmentsto one or more content delivery networks (CDNs) for retrieval and use inrendering the program at a media player; generating manifests for theprogram and continually updating the manifests and uploading the updatedmanifests to the CDNs as the segments are uploaded to the CDNs, themanifests including a master manifest and set ofnetwork-personal-video-recorder (npvr) manifests for respective ones ofthe encodings, the master manifest including references to the set ofnpvr manifests to enable selection from among the encodings in renderingthe program at the media player; and detecting a program boundary of theprogram in the source content, and in response: completing a current setof npvr manifests in current directories of the CDNs; creating newdirectories in the CDNs and starting a new set of npvr manifests in thenew directories; and uploading subsequent segments and npvr manifestupdates to the new directories.
 2. The method of claim 1, wherein thesource content is audio/video content.
 3. The method of claim 1, whereinthe program boundaries are specified in-band with the content (e.g.,SCTE-35 cue tones).
 4. The method of claim 1, wherein the programboundaries are specified out-of-band based off of wall-clock times(e.g., SCTE-118, proprietary EPG data, or fixed duration timeschedules).
 5. The method of claim 1, wherein the new directories foreach program have a hierarchical directory structure having distincthierarchical levels based on the program boundaries, the date and timethe program is processed, and respective identifiers of the sourcestream and encoding.
 6. The method of claim 1, wherein a new encryptionkey is generated for each new program.
 7. The method of claim 1, whereinan existing encryption key is carried over to a new program npvrmanifest.
 8. The method of claim 1, wherein the master manifest is anHTTP Live Streaming master manifest, the segments are HTTP LiveStreaming segments, and the npvr manifests are non-sliding-windowvariant stream manifests that continuously grow until complete and thenare ended with an ENDLIST tag, each npvr manifest including sequentialreferences to all the segments of the program.
 9. The method of claim 1,wherein the program spans multiple sequential npvr manifests, andfurther including adding pointers to each npvr manifest to identify asequentially preceding npvr manifest and a sequentially following npvrmanifest.
 10. The method of claim 1, further comprising: detectingadvertisement boundaries and including advertisement boundaryinformation in the npvr manifests to identify discontinuities in thecontent stream.
 11. The method of claim 10, wherein the advertisementboundaries are detected based on in-band SCTE-35 cue tones and SCTE-130placement opportunity information.
 12. The method of claim 10, whereinthe advertisement boundaries are provided out-of-band based off ofwall-clock times.
 13. The method of claim 10, further comprising addingcomments to the npvr manifests to denote first and last segments thatcontain the advertisement.
 14. The method of claim 1, wherein theprogram is a section of live streaming content corresponding to an npvrmanifest.